<script setup lang="ts">
import SonCom from './components/SonCom.vue';
import {ref} from 'vue'
const  fName =ref('jack')
const  fMoney =ref(10)

const SonCall=(moneyNum:number )=>{
  console.log('支付宝到账',moneyNum)
  //父组件接收传递过来的数据,并修改
  //数据修改之后再次传递给子组件
  fMoney.value=moneyNum
}

</script>
<template>
  <h2>我是父组件</h2>
  <SonCom :name="fName" :money="fMoney" @chang-money="SonCall" ></SonCom>

</template>
<style scoped></style>